image1=imread('cameraman.tif');
[m,n]=size(image1);
result1=uint8(zeros(m,n));
factor=[-1 0 0;0 1 0;0 0 1];
for i=1:m
    for j=1:n
       result1(j,i)=image1(i,j);
    end
end
subplot(2,1,1)
imshow(image1);
subplot(2,1,2);
imshow(result1);